/*******************************************************
> Copyright (C) 2024 ==IOT== All rights reserved.
> File Name: iterator_invaild.cpp
> Author: IOT
> Website:www.slq.org
> Created Time: 2024年10月31日 星期四 09时25分53秒
***************************************************/

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <algorithm>
#include <memory>

using namespace std;

int main(int argc,const char* argv[])
{
	list<int> mylist = {1,2,3};

	list<int>::iterator it;
	it = mylist.begin();
	cout << *it << endl;
	it = mylist.erase(it);
	cout << *it << endl;

#if 0
	vector<int> vec = {1,2,3};

	vector<int>::iterator it;
	it = vec.begin();
	cout << "erase before:" << *it << endl;
	vec.erase(it);
	cout << "erase after:" << *it << endl;
#endif
    return 0;
}

